const { checkAuth } = require('../utils/auth.js')

Component({
  methods: {
    switchTab(e) {
      if (!checkAuth()) return
      
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({
        url
      })
    }
  }
}) 